package com.lipy.dubboconsumer.controller;

import com.alibaba.dubbo.config.annotation.Reference;
import com.lipy.dubbocommon.service.DemoService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("demo")
public class DemoController {
    @Reference
    DemoService demoService;

    @GetMapping("get")
    public Object get(){
        String s = demoService.get();
        System.out.println("DemoController.get "+s);
        return s;
    }
}
